package com.group10.service;

import com.group10.entity.PageBean;
import com.group10.entity.Result;
import com.group10.entity.User;
import com.group10.entity.UserState;
import org.apache.ibatis.annotations.Update;

import java.util.Map;

public interface UserService {

    User findById(String id);

    UserState checkState(String id);

    boolean updateState(String id);

    boolean silence(String id,Integer minute);

    boolean suspend(String id,Integer minute);

    Result<?> login(String id, String password);

    Result<?> insertUser(String id,String password,String email,String code,String name,String sex,int age,String ethnic,String img);

    Result<?> findPassword(String id,String newPsd,String code);

//    void updateAllUserState();

    Result<?> getAllUser(String token,Integer pageNum,Integer pageSize);

    Map<String, Object> userInfo(String token);

    Result<?> updateUser(User user);

    Result<?> newToken(String token);
}
